package org.example;

import java.util.HashMap;
import java.util.Map;

public class DataSupplier {
    Map<Integer, String> dataSource = new HashMap<>();
    DataSupplier(){
        dataSource.put(1, "数据1");
        dataSource.put(2, "数据2");
        dataSource.put(3, "数据3");
        dataSource.put(4, "数据4");
    }
    public String getData(Integer index){
        return dataSource.get(index);
    }

}
